package com.xssq.mvc.impl;

import com.xssq.mvc.Handler;
import com.xssq.mvc.HandlerInvoker;

public class DefaultHandlerInvoker implements HandlerInvoker {

	/**
	 * 调用对应handler
	 */
	@Override
	public Object invokeHandler(Handler handler) throws Exception {
		Object controller = handler.getControllerClass().newInstance();
		// 暂不支持参数绑定
		return handler.getActionMethod().invoke(controller, new Object[]{});
	}
	
}
